import request from '@/utils/request'

// 用户登录
export const reqLogin = (data) => {
  return request({
    method: 'post',
    // /api/sys/login  => 浏览会自动的拼接成 http://localhost:8888/api/sys/login
    // localhost:8888/api/sys/logi   //  http://localhost:8888/api/localhost:8888/api/sys/logi
    url: '/sys/login',
    data
  })
}

// 获取用户资料
export const reqGetUserInfo = () => {
  return request({
    method: 'post',
    url: '/sys/profile'
  })
}

// 获取用户的基本信息
export const reqGetUserDetail = (id) => {
  return request({
    method: 'get',
    url: '/sys/user/' + id
  })
}
